#ifndef RAGWINDOW_H
#define RAGWINDOW_H

#include <QMainWindow>
#include <QPushButton>
#include <QTextEdit>
#include <QListWidget>
#include <QSpinBox>
#include <QLabel>
#include <QFormLayout>
#include <QCoreApplication>
#include <QGroupBox>
#include "embeddingmanager.h"

class RAGWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit RAGWindow(QWidget *parent = nullptr);

private slots:
    void processFile();
    void queryDatabase();
    void clearDatabase();

private:
    void setupUI();
    void showStatus(const QString &message);

    QWidget *centralWidget;
    QVBoxLayout *mainLayout;

    QPushButton *processFileBtn;

    QTextEdit *queryInput;
    QPushButton *queryBtn;
    QListWidget *resultsList;

    // 参数设置
    QSpinBox *maxChunkSpin;
    QSpinBox *minChunkSpin;
    QSpinBox *topKSpin;

    QPushButton *clearBtn;
    QLabel *statusLabel;

    EmbeddingManager *embeddingManager;
};

#endif // RAGWINDOW_H
